package com.marktotop.controller;

import com.marktotop.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * AdminController
 *
 * @author WXLD
 * @Data 2021/6/30
 * @Since 1.0
 */
@Controller
public class AdminController {

    @Autowired
    private AdminService adminService;

    @RequestMapping("/")
    public String index(Model model){
        model.addAttribute("username",adminService.getAllAdmin());
        return "index";
    }
}
